home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 65.zip / BS1 part 65 / Math Visin v2.1 disk 1.adf / Arexx.WB / Contour / Center < prev    next >
Text File  |  1992-02-12  |  1KB  |  44 lines

  1. /* Center    Allow to enter Screen Coordinates as center and width
  2.  
  3.    Normally the screen coordinates in MathVision are entered by specifying
  4.    the edges of the screen; Xmin, Xmax, Ymin and Ymax.
  5.  
  6.    Ymax +----------+
  7.         |          |
  8.         |          |
  9.    Ymin +----------+
  10.         Xmin    Xmax
  11.  
  12.    Sometimes this is awkward, so this program lets you use an alternate 
  13.    system.  In this system you specify the center of the screen, and
  14.    how wide an area around it you wish to view.
  15.  
  16.     <------- Xwidth ------>   
  17.    +-----------------------+ ^
  18.    |                       | |
  19.    |                       | |
  20.    |   (Xcenter,YCenter)   | YWidth
  21.    |                       | |
  22.    |                       | |
  23.    +-----------------------+ v
  24.  
  25. ==========================================================================*/
  26.  
  27. ADDRESS "MathVision"
  28. OPTIONS RESULTS
  29. NUMERIC DIGITS 14
  30.  
  31. OPTIONS PROMPT "XCenter XWidth: "
  32. PULL xcenter xwidth
  33.  
  34. OPTIONS PROMPT "YCenter YWidth: "
  35. PULL ycenter ywidth
  36.  
  37. EditScreenToFront
  38.  
  39. xmin xcenter-xwidth/2
  40. xmax xcenter+xwidth/2
  41. ymin ycenter-ywidth/2
  42. ymax ycenter+ywidth/2
  43.  
  44.